package com.lsx143.realtime.util;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 线程池
 */
public class ThreadPoolUtil {
    /**
     * 获取线程池
     *
     * @return 线程池
     */
    public static ThreadPoolExecutor getThreadPool() {
        return new ThreadPoolExecutor(
                300,
                500,
                30,
                TimeUnit.SECONDS,
                new LinkedBlockingQueue<>(100)
        );
    }
}
